<template>
  <div class="fandbanb" style="background-color: #f5f6fa">
    <hear></hear>
    <BDhear :num="5"></BDhear>
    <div style="background-color: rgb(245, 246, 250)">
      <div class="main">
        <div class="xiugai" style="display: flex; width: 100%">
          <div
            style="width: 100%; display: flex; justify-content: space-around"
            class="fanelradio"
          >
            <el-radio
              @change="handleClick"
              border
              v-model="activeName"
              :label="3"
              >反担保人</el-radio
            >
            <el-radio
              @change="handleClick"
              border
              v-model="activeName"
              :label="6"
              >出质人</el-radio
            >
            <el-radio
              @change="handleClick"
              border
              v-model="activeName"
              :label="9"
              >抵押人</el-radio
            >
          </div>
        </div>
        <!-- v-if="ciasd" -->
        <div class="no">
          <h3>· {{ xuanren }}信息</h3>
          <div class="noform">
            <el-row :gutter="15">
              <el-form
                ref="elForm"
                :disabled="chengong"
                :model="formData"
                :rules="rules"
                size="medium"
                label-width="100px"
              >
                <el-col :span="20">
                  <el-form-item
                    label-width="130px"
                    label="姓名："
                    prop="field136"
                  >
                    <el-input
                      v-model="formData.handler_name_one"
                      placeholder="请输入反担保人姓名："
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="20">
                  <el-form-item
                    label-width="130px"
                    label="联系电话："
                    prop="field137"
                  >
                    <el-input
                      v-model="formData.handler_mobile_one"
                      placeholder="请输入联系电话："
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col v-if="chengong" :span="20">
                  <el-form-item
                    label-width="130px"
                    label="身份证号码："
                    prop="field138"
                  >
                    <el-input
                      v-model="formData.cardno_one"
                      placeholder="请输入身份证号码："
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col v-if="!chengong" :span="15">
                  <el-form-item
                    label-width="130px"
                    label="验证码："
                    prop="field139"
                  >
                    <el-input
                      v-model="formData.captcha_one"
                      placeholder="请输入验证码："
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                    <el-button
                      v-if="!cionbutton"
                      style="
                        width: 109px;
                        border-radius: 2px 2px 2px 2px;
                        opacity: 1;
                      "
                      @click="send"
                      type="primary"
                      plain
                      >{{ yanzhneg }}</el-button
                    >
                    <el-button
                      v-else
                      disabled
                      style="
                        width: 109px;
                        border-radius: 2px 2px 2px 2px;
                        background-color: #a0cfff;
                        opacity: 1;
                      "
                      type="primary"
                      plain
                      >{{ yanzhneg }}</el-button
                    >
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <!-- <el-row :gutter="15">123</el-row> -->
          </div>
          <div style="padding-left: 130px">
            <el-button
              style="
                width: 161px;
                height: 35px;
                background: #4693f7;
                border-radius: 2px 2px 2px 2px;
                opacity: 1;
              "
              type="primary"
              @click="logins"
              >{{ kaishi }}</el-button
            >
          </div>
        </div>
      </div>
      <div v-if="chengong" class="mains">
        <div class="nos">
          <h3 style="margin: 20px">· 反担保人身份证</h3>
          <div class="noforms">
            <el-row>
              <el-col :span="10">
                <el-image
                  style="width: 264px; height: 159px"
                  :src="$baseUrl + shenurl"
                ></el-image>
                <!-- <img
                  src="@/assets/login/shen1.png"
                  alt=""
                  style="width: 264px; height: 159px"
                  srcset=""
              /> -->
              </el-col>
              <el-col :span="10">
                <el-image
                  style="width: 264px; height: 159px"
                  :src="$baseUrl + geurl"
                ></el-image>
                <!-- <img
                  src="@/assets/login/shen2.png"
                  alt=""
                  style="margin-left: 20px; width: 264px; height: 159px"
                  srcset=""
              /> -->
              </el-col>
            </el-row>
          </div>
        </div>
      </div>
      <div v-if="chengong" class="agreement">
        <div class="EP_pdf_box">
          <div class="EP_PDF_IMG_LEFT">
            <div class="EP_img">
              <img src="../../assets/BidSecurity/EP_PDF.png" />
            </div>
            <div style="font-size: 16px; color: #333">
              <div>个人反担保协议</div>
              <div>{{ signtime | dateFormat }}</div>
            </div>
          </div>
          <div class="EP_PDF_RIGHT">
            <el-button
              @click="farenqianzhang1"
              style="width: 82px; height: 34px"
              >查看</el-button
            >
          </div>
        </div>
      </div>
      <div class="footer">
        <el-button
          @click="shang()"
          v-if="isShow"
          style="width: 175px; height: 60px"
          >上一步</el-button
        >
        <el-button
          v-if="chengong"
          @click="chaxun"
          style="width: 175px; height: 60px"
          type="primary"
          >下一步</el-button
        >
        <!-- @click="tiao()" -->
        <el-button
          v-if="!isShow"
          @click="$router.push('/')"
          style="width: 175px; height: 60px"
          type="primary"
          >回到首页</el-button
        >
        <el-button
          v-if="isShow1"
          style="width: 175px; height: 60px"
          type="info"
          disabled
          >审核中</el-button
        >
        <el-button
          v-if="isShow2"
          @click="$router.push('/Bidpayments')"
          style="width: 175px; height: 60px"
          type="primary"
          disabled=""
          >审核已完成，去支付</el-button
        >
        <!-- <el-button  @click="$router.push('/')"  type="info" disabled="">审核中  </el-button> -->
        <!-- <el-button  @click="$router.push('/')"  type="info" disabled="">审核中  </el-button> -->
      </div>
      <el-dialog
        class="casdfan"
        title=""
        :visible.sync="dialogVisible"
        width="30%"
        :show-close="false"
        :close-on-click-modal="false"
      >
        <div
          style="
            height: 165px;
            display: flex;
            flex-direction: column;
            position: relative;
          "
        >
          <div
            @click="cionguanbi"
            style="position: absolute; top: -21px; right: -12px"
          >
            <i style="font-size: 26px" class="el-icon-circle-close"></i>
          </div>
          <div
            style="
              flex: 1;
              margin-bottom: 20px;
              display: flex;
              justify-content: center;
            "
          >
            <div style="position: relative">
              <div class="loader"></div>
              <div style="position: absolute; top: 45%; left: 25%">
                {{ zhngtime }}
              </div>
              <!-- <i class="el-icon-loading"></i> -->
            </div>
          </div>

          <div
            style="
              display: flex;
              justify-content: center;
              flex-direction: column;
            "
          >
            <div style="width: 185px">正在进行个人反担保,请稍等...</div>

            <div style="width: 225px">已经进行{{ cheng }}</div>
          </div>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import {
  bhpay2,
  danbaoqianzhang,
  bhpay,
  bhpay3,
  zhifuasd,
  faren,
  detail,
  grrz,
} from "@/api/system/liucheng";
import { jiaoyan } from "@/api/user";
import { datatijiao } from "@/api/system/liucheng";
import BDhear from "./BDhear.vue";
import axios from "axios";
// import hear from ".././../components/hear.vue";
export default {
  components: {
    BDhear,
    // hear,
  },
  name: "ElectronicProtocol",
  data() {
    return {
      // status 0 未进行   1  一开始   2  已完成
      cheng: null,
      // cheng:,
      dialogVisible: false,
      cionbutton: false,
      chengong: false,
      times: 120,
      yanzhneg: "获取验证码",
      file: "", //文件地址
      isShow: true,
      isShow1: false,
      isShow2: false,
      isShow3: false,
      xuanren: "反担保人",
      kaishi: "开始个人反担保",
      activeName: 3,
      geurl: "",
      shenurl: "",
      ElectronicProtocollist: { guarantee_apply_id: "549" },
      formData: {
        apply_number: sessionStorage.getItem("apply_number"),
        guarantee_apply_id: sessionStorage.getItem("guarantee_apply_id"),
        diya: undefined,
        chuzhi: undefined,
        fandanbao: undefined,
        // handler_name_one: undefined,
        // cardno_one: undefined,
        // captcha_one:"",
        // proid: undefined,
        // handler_mobile_one: undefined,
        // handler_name_one: "王治家",
        // cardno_one: "410381198711235517",
        // captcha_one: "123456",
        // proid: undefined,
        // handler_mobile_one: "13681030210",
        handler_name_one: "",
        cardno_one: "",
        captcha_one: "",
        proid: undefined,
        handler_mobile_one: "",
      },
      ciasd: true,
      rules: {
        diya: [
          {
            required: true,
            message: "请输入抵押人：",
            trigger: "blur",
          },
        ],
        chuzhi: [
          {
            required: true,
            message: "请输入出质人：",
            trigger: "blur",
          },
        ],
        fandanbao: [
          {
            required: true,
            message: "请输入反担保人：",
            trigger: "blur",
          },
        ],
        handler_name_one: [
          {
            required: true,
            message: "请输入反担保人姓名：",
            trigger: "blur",
          },
        ],
        handler_mobile_one: [
          {
            required: true,
            message: "请输入联系电话：",
            trigger: "blur",
          },
        ],
        cardno_one: [
          {
            required: true,
            message: "请输入身份证号码：",
            trigger: "blur",
          },
        ],
      },
      dqtime: 1668168744, //保函签订时间
      wanctime: "",
      xztime: "", //当前时间
      tishi: "请注意接收短信并进行个人担保",
      siodn: "",
      timer: null,
      startTime: 0,
      yanTimer: null,
      loading: null,
      zhngtime: "",
      chengongs: false,
    };
  },
  beforeDestroy() {
    // 执行清理工作
    clearTimeout(this.downTimer);
  },
  created() {
    // this.ElectronicProtocols();
    // this.xinagqing();

    // datatijiao(this.params).then(res => {
    //   if (res.data.code == 1) {
    //     this.$message.success('提交成')
    //     this.$router.push("/bidFrom");
    //   }
    // });
    if (
      sessionStorage.getItem("sendcode") == null ||
      sessionStorage.getItem("sendcode") == ""
    ) {
      this.bianli(0);
    } else {
      this.bianli(sessionStorage.getItem("sendcode"));
    }
  },
  mounted() {
    if (window.performance.navigation.type == 1) {
      console.log("页面被刷新");
      clearTimeout(this.downTimer);
      //    console.log(this)
    } else {
      console.log("首次被加载");
    }
  },

  methods: {
    cionguanbi() {
      console.log("ajgsdja关闭");
      this.chengongs = true;
      this.kaishi = "开始个人反担保";
    },
    logins() {
      var bba = {
        mobile: this.formData.handler_mobile_one.toString(),
        code: this.formData.captcha_one.toString(),
        // recode: this.formData.captcha_one,
      };
      jiaoyan(bba).then((res) => {
        // console.log( res.data.data.id,'user');
        if (res.data.code == 200) {
          this.fandianbao();
        } else {
          this.$message.error(res.data.msg);
        }
      });
    },
    bianli(e) {
      var bbc = {
        sendcode: e,
        applyNumber: sessionStorage.getItem("apply_number"),
      };
      grrz(bbc).then((res) => {
        if (res.data.code == 200) {
          // res.data.data.status=1
          if (res.data.data.status == 0) {
            console.log("未开始");
            return;
          }
          if (res.data.msg == "认证成功") {
            var rss = res.data.data;
            this.chengong = true;
            this.kaishi = "个人反担保成功";
            this.file = rss.file;
            this.formData.handler_name_one = rss.username;
            this.formData.handler_mobile_one = rss.mobile;
            this.formData.cardno_one = rss.cardcode;
            this.shenurl = rss.cardback;
            this.geurl = rss.cardfront;
            this.signtime = rss.signtime;
          } else {
            const timestamp = new Date(res.data.data.createTime).getTime();
            this.dqtime = timestamp / 1000;
            // this.dqtime = res.data.data.createTime;
            this.dialogVisible = true;
            this.handlerData(); //轮询方法
            console.log("开始未认证");
          }
          // this.$message.success(res.data.msg);
          // this.$router.push('/Agreement')
          // this.isShow = false;
        } else {
        }
      });
    },

    chaxun() {
      //   this.$router.push("/Agreement");
      // return
      var bbc = {
        applyNumber: sessionStorage.getItem("apply_number"),
        sendcode: sessionStorage.getItem("sendcode"), //测试先写死
      };
      grrz(bbc).then((res) => {
        if (res.data.code == 200) {
          // this.$message.success(res.data.msg);
          this.$router.push("/BidSecurity/Protocol");
          // this.isShow = false;
        } else {
          this.$message({
            showClose: true,
            message: res.data.msg,
            type: "error",
          });
        }
      });
    },
    lyxuan(e) {
      console.log(e);
    },
    //选择类型
    handleClick(tab, event) {
      console.log(tab);
      if (tab == 3) {
        this.xuanren = "反担保人";
      }
      if (tab == 6) {
        this.xuanren = "出质人";
      }
      if (tab == 9) {
        this.xuanren = "抵押人";
      }
      // console.log(tab.index,tab._props.label);
      // this.xuanren=tab._props.label
    },
    //文件预览
    yulan(e) {
      this.$confirmMy({
        title: e,
      });
      return;
      let link = document.createElement("a");
      link.style.display = "none";
      link.style.download = "";
      link.target = "_blank";
      link.href = this.$baseUrl + e + "";
      // link.setAttribute("download", ".pdf");
      // +'.pdf' 通过不同的后缀名下载不同的文件
      //这里下载的是pdf格式的文件，拿到接口里的res也必须是pdf的文件流
      // document.body.appendChild(link);
      link.click();
      URL.revokeObjectURL(link.href); //URL.revokeObjectURL() 静态方法用来释放一个之前通过调用 URL.createObjectURL() 创建的已经存在的 URL 对象。当你结束使用某个 URL 对象时，应该通过调用这个方法来让浏览器知道不再需要保持这个文件的引用了。
      document.body.removeChild(link);
    },
    //获取验证码
    send() {
      axios({
        url: "http://192.168.0.28:8082/sms/send",
        // url: "http://192.168.0.28:8082/mobile/sms/send",
        method: "post", // params: '必须是一个无格式对象 query参数',
        data: {
          mobile: this.formData.handler_mobile_one,
          // event: "check",
          name: this.formData.handler_name_one,
        },
        // timeout: 10000,
        headers: {
          // token: sessionStorage.getItem("token"),
          Authorization: "Bearer " + sessionStorage.getItem("token"),
        },
      })
        .then((res) => {
          console.log(res.data.msg);
          if (res.data.code == 200) {
            this.cionbutton = true;
            this.$message({
              message: res.data.msg,
              type: "success",
            });
            this.daojishi();
            // this.$router.push("/BidSecurity/ElectronicProtocol");
          } else {
            this.$message.error(res.data.msg);
          }
          // this.$router.push("/BidSecurity/Bidpayment");
        })
        .catch((err) => {
          console.log("失败", err);
          // this.$notify.error({
          //   message: err.response.data.msg,
          // });
        });
    },
    wancheng() {
      this.$message.error("请勿重复提交");
    },
    guarantee() {
      guarantee(this.formData).then(() => {});
    },
    shang() {
      this.$router.push("/BidSecurity/bidFrom");
    },
    fandianbao() {
      this.chengongs = false;
      if (this.kaishi == "个人反担保成功") {
        return;
      }
      if (this.kaishi == "等待个人反担保") {
        return;
      }
      axios({
        url: "http://192.168.0.28:8082/systems/applications/guaranteeadd",
        // url: "http://192.168.0.28:8082/handle/baohan/guarantee_add",
        method: "post", // params: '必须是一个无格式对象 query参数',
        data: {
          handlerName: this.formData.handler_name_one,
          handlerMobile: this.formData.handler_mobile_one,
          cardnoOne: this.formData.cardno_one,
          captchaOne: this.formData.captcha_one,
          proid: sessionStorage.getItem("proid"),
          applyNumber: sessionStorage.getItem("apply_number"),
        },
        // data: {
        //   handlerName: "王志家",
        //   handlerMobile: "13681030210",
        //   cardnoOne: "",
        //   captchaOne: "123456",
        //   proid: 1126194073477189632,
        //   applyNumber: "2024010314574853135678361a51028150",
        // },
        // timeout: 10000,
        headers: {
          Authorization: "Bearer " + sessionStorage.getItem("token"),
        },
      })
        .then((res) => {
          //    this.$notify.error({
          //   message: res.data.msg
          // });
          console.log("tijiao", res);
          if (res.data.code == 200) {
            this.$message.success(res.data.msg);
            this.dialogVisible = true;
            sessionStorage.setItem("sendcode", res.data.data);
            this.bianli(res.data.data);
            // this.isShow = false;
          }
          // this.$router.push("/BidSecurity/Bidpayment");
        })
        .catch((err) => {
          console.log("失败", err);
          if (err.response.data.code == 401) {
            this.$notify.error({
              message: "请重新登录",
            });
            this.$router.push("/login");
            return;
          }
          this.$notify.error({
            message: err.response.data.msg,
          });
        });
    },
    tiao() {
      if (this.ciasd) {
        axios({
          url: "http://192.168.0.28:8082/mobile/agent/baohan/guarantee_add",
          method: "post", // params: '必须是一个无格式对象 query参数',
          data: {
            handler_name_one: this.formData.handler_name_one,
            handler_mobile_one: this.formData.handler_mobile_one,
            cardno_one: this.formData.cardno_one,
            captcha_one: this.formData.captcha_one,
            proid: sessionStorage.getItem("proid"),
            apply_number: sessionStorage.getItem("apply_number"),
          },
          timeout: 1000,
          headers: {
            token: sessionStorage.getItem("token"),
          },
        })
          .then((res) => {
            //    this.$notify.error({
            //   message: res.data.msg
            // });
            console.log("tijiao", res);
            if (res.data.code == 1) {
              this.$message.success("提交成功等待审核");
              // this.isShow = false;
            }
            // this.$router.push("/BidSecurity/Bidpayment");
          })
          .catch((err) => {
            console.log("失败", err.response.data);
            if (err.response.data.code == 401) {
              this.$notify.error({
                message: "请重新登录",
              });
              this.$router.push("/login");
              return;
            }
            this.$notify.error({
              message: err.response.data.msg,
            });
          });
      }
      axios({
        url: "http://192.168.0.28:8082/mobile/agent/baohan/subdata",
        method: "post", // params: '必须是一个无格式对象 query参数',
        data: {
          guarantee_apply_id: sessionStorage.getItem("guarantee_apply_id"),
        },
        timeout: 1000,
        headers: {
          token: sessionStorage.getItem("token"),
        },
      })
        .then((res) => {
          this.$notify.error({
            message: res.data.msg,
          });
          console.log("tijiao", res);
          if (res.data.code == 1) {
            this.$message.success("提交成功等待审核");
            this.isShow = false;
          }
          // this.$router.push("/BidSecurity/Bidpayment");
        })
        .catch((err) => {
          console.log("失败", err.response.data);
          if (err.response.data.code == 401) {
            this.$notify.error({
              message: "请重新登录",
            });
            this.$router.push("/login");
            return;
          }
          this.$notify.error({
            message: err.response.data.msg,
          });
        });
    },
    lchaxun() {
      var bbc = {
        apply_number: sessionStorage.getItem("apply_number"),
      };
      grrz(bbc).then((res) => {
        if (res.data.code == 200) {
          // this.$message.success(res.data.msg);
          if (res.data.msg == "认证成功") {
            this.chengong = true;
            this.kaishi = "个人反担保成功";
            this.file = res.data.data.file;
            this.loading.close();
          }
        } else {
          // this.timer=null
          // window.clearInterval(this.timer)
          //        this.$message({
          //   showClose: true,
          //   message: res.data.msg,
          //   type: 'error'
          // });
        }
      });
    },
    shijian(value) {
      let date = new Date(value * 1000); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
      // let date = new Date(value);
      let y = date.getFullYear();
      let MM = date.getMonth() + 1;
      MM = MM < 10 ? "0" + MM : MM;
      let d = date.getDate();
      d = d < 10 ? "0" + d : d;
      let h = date.getHours();
      h = h < 10 ? "0" + h : h;
      let m = date.getMinutes();
      m = m < 10 ? "0" + m : m;
      let s = date.getSeconds();
      s = s < 10 ? "0" + s : s;
      // return y + "-" + MM + "-" + d + " "+h+ ":"+m+ ":" +s //多种时间格式的拼接
      // return this.cheng = h + "小时" + m + "分钟" + s + "秒"; //多种时间格式的拼接
      return h + "小时" + m + "分钟" + s + "秒"; //多种时间格式的拼接
    },
    farenqianzhang1() {
      this.yulan(this.file);
    },
    daojishi() {
      var that = this;
      if (this.times == 0) {
        clearTimeout(this.yanTimer);
        this.cionbutton = false;
        this.yanzhneg = "获取验证码";
      } else {
        this.times--;
        this.yanzhneg = this.times + "s";
        this.yanTimer = setTimeout(() => {
          that.daojishi();
        }, 1000);
      }
    },
    xintim(dateDiff) {
      dateDiff = dateDiff * 1000;
      var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000)); //计算出相差天数
      var leave1 = dateDiff % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
      var hours = Math.floor(leave1 / (3600 * 1000)); //计算出小时数
      //计算相差分钟数
      var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
      var minutes = Math.floor(leave2 / (60 * 1000)); //计算相差分钟数
      //计算相差秒数
      var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
      var seconds = Math.round(leave3 / 1000);
      var leave4 = leave3 % (60 * 1000); //计算分钟数后剩余的毫秒数
      var timeFn =
        dayDiff + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
      this.zhngtime =
        this.addZero(hours) +
        ":" +
        this.addZero(minutes) +
        ":" +
        this.addZero(seconds);
      return timeFn;
    },
    addZero(num) {
      if (parseInt(num) < 10) {
        num = "0" + num;
      }
      return num;
    },

    // 开始准备轮询
    handlerData() {
      var that = this;
      console.log(this.dqtime);
      var unixTimestamp = Math.round(new Date().getTime() / 1000);
      console.log("发起签章时间", this.shijian(this.dqtime));
      console.log("当前时间", this.shijian(unixTimestamp));
      var sunixTimestamp = unixTimestamp - this.dqtime;
      //  console.log("计算时间1",this.xintim(sunixTimestamp))
      this.cheng = this.xintim(sunixTimestamp);
      // console.log("计算时间2",this.shijian(sunixTimestamp))
      // this.bianli();
      //  var commonTime = unixTimestamp.toLocaleString()
      // console.log(this.shijian(unixTimestamp))
      //  this.chengong=Math.round(new Date().getTime()/1000)-this.dqtime
      if (this.chengong == true || this.chengongs == true) {
        // console.log("停止");
        this.dialogVisible = false;
        clearTimeout(this.downTimer);
      } else {
        // this.cheng--
        this.downTimer = setTimeout(() => {
          // that.handlerData();
          var bbc = {
            sendcode: sessionStorage.getItem("sendcode"),
            applyNumber: sessionStorage.getItem("apply_number"),
          };
          grrz(bbc).then((res) => {
            if (res.data.code == 200) {
              // console.log("3S")
              // res.data.data.status=1
              if (res.data.data.status == 0) {
                // console.log("未开始")
                return;
              }
              if (res.data.msg == "认证成功") {
                var rss = res.data.data;
                that.chengong = true;
                that.kaishi = "个人反担保成功";
                that.file = rss.file;
                that.formData.handler_name_one = rss.username;
                that.formData.handler_mobile_one = rss.mobile;
                that.formData.cardno_one = rss.cardcode;
                that.shenurl = rss.cardback;
                that.geurl = rss.cardfront;
                that.signtime = rss.signtime;
                this.dialogVisible = false;
              } else {
                const timestamp = new Date(res.data.data.createTime).getTime();
                this.dqtime = timestamp / 1000;
                // that.dqtime = res.data.data.createTime;
                that.dialogVisible = true;
                this.handlerData(); //轮询方法
                // console.log("lunxun,开始未认证")
              }
              // this.$message.success(res.data.msg);
              // this.$router.push('/Agreement')
              // this.isShow = false;
            } else {
            }
          });
        }, 5000);
      }

      //  for (let i = 0; i <= 30; i++) {
      //     // console.log(i);
      //   this.timer=setTimeout(
      //       function () {
      //       console.log("lunxun")
      //      that.lchaxun()
      //       },
      //       i*3000,i

      //     );
      //   }
    },
  },
};
</script>
<style>
.casdfan .el-dialog {
  margin-top: 30vh !important;
}
.casdfan .el-dialog__header {
  display: none;
}
.el-icon-loading:before {
  content: "\E6CF";
  font-size: 80px !important;
}
.el-loading-spinner .el-loading-text {
  color: #409eff;
  margin: 3px 0;
  font-size: 20px;
}
.xiugai .el-tabs__header {
  padding: 0;
  position: relative;
  margin: 0px !important;
}
.fanelradio .el-radio {
  margin-right: 0 !important;
}
</style>
<style scoped>
.loader {
  border: 5px solid #f3f3f3;
  border-radius: 50%;
  border-top: 5px solid #2e8e9a;
  width: 120px;
  height: 120px;
  /* animation-name:load; */
  animation: load 3s linear infinite;
}
@keyframes load {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.el-upload__tip {
  line-height: 1.2;
}
.main {
  /* position: absolute;
  top: 0;
  left: 0;
  bottom: 160px;
  right: 0; */
  /* padding: 0 11%; */
  background: #fff;
  /* margin: auto; */
  /* width: 100%; */
  margin: 0 25%;
  margin-top: 20px;
  /* height: 400px; */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.mains {
  /* position: absolute;
  top: 0;
  left: 0;
  bottom: 160px;
  right: 0; */
  margin: 0 25%;
  margin-top: 20px;
  background: #fff;
  /* margin: auto; */
  /* width: 100%; */
  /* height: 400px; */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.main .yes {
  width: 49%;
  height: 360px;
  border: #cecece 1px solid;
}
.main h3 {
  margin: 20px;
  margin-left: 10px;
}
.main .yesform {
  width: 100%;
  height: 260px;
  /* margin: 50px; */
}
.main .no {
  /* width: 49%; */
  padding-bottom: 20px;
  /* border: #cecece 1px solid; */
  border: #cecece 1px solid;
}
.mains .nos {
  width: 100%;
  height: 260px;

  border: #cecece 1px solid;
}
.main .noform {
  width: 100%;
  /* height: 200px;  */
  /* height: 250px; */
}
.mains .noforms {
  width: 100%;
  height: 180px;
  margin: 20px;
  /* margin-top: 20px; */
  /* margin: 50px; */
}
.main .noform button {
  width: 50%;
  height: 38px;
  background-color: #1795ff;
  color: #fff;
  border: none;
  position: absolute;
  border-radius: 5px;
  margin-left: 5px;
  margin-bottom: 1px;
}
.agreement {
  /* position: absolute;
  top: 63%;
  left: 10.7%; */
  /* padding: 5% 11%; */
  width: 100%;
  /* height: 200px; */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.footer {
  width: 100%;
  height: 100px;
  margin-top: 5%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: center;
}

.EP_PDF_RIGHT {
  width: 140px;
  display: flex;
  justify-content: space-around;
}

.EP_PDF_IMG_LEFT {
  display: flex;
  align-items: center;
  width: 300px;
  justify-content: space-around;
}

.EP_img {
  width: 59.4px;
  height: 61.97px;
  margin: 0 10px;
}

.EP_pdf_box {
  margin-top: 20px;
  width: 50%;
  height: 80px;
  border: 1px solid #cecece;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}
</style>
